varying vec3 normal;
void main() {
    float intensity;
    vec4 color;
    vec3 n = normalize(normal);
    vec3 l = normalize(gl_LightSource[0].position).xyz;
    
    float L = dot(n, l);
    
    if (L < 0.5) L = (0.5-L) * 2.0;
    if (L > 0.7) L = 1.0;

    color = vec4(L, L, L, 1.0);
    

    gl_FragColor = color;
}